import Layout from '@/layout'

const campusRouter = {
  path: '/campus',
  component: Layout,
  redirect: '/campus/dashboard',
  name: 'Campus',
  meta: {
    title: '校园防欺凌',
    icon: 'el-icon-warning'
  },
  children: [
    {
      path: 'dashboard',
      component: () => import('@/views/campus/dashboard/index'),
      name: 'CampusDashboard',
      meta: { 
        title: '实时监控', 
        icon: 'el-icon-monitor',
        affix: true
      }
    },
    {
      path: 'school',
      component: () => import('@/views/campus/school/index'),
      name: 'CampusSchool',
      meta: { 
        title: '学校管理', 
        icon: 'el-icon-school',
        perms: ['campus:school:list']
      }
    },
    {
      path: 'alarm',
      component: () => import('@/views/campus/alarm/index'),
      name: 'CampusAlarm',
      meta: { 
        title: '报警管理', 
        icon: 'el-icon-warning-outline',
        perms: ['campus:alarm:list']
      }
    },
    {
      path: 'device',
      component: () => import('@/views/campus/device/index'),
      name: 'CampusDevice',
      meta: { 
        title: '设备管理', 
        icon: 'el-icon-camera',
        perms: ['campus:device:list']
      }
    },
    {
      path: 'user',
      component: () => import('@/views/campus/user/index'),
      name: 'CampusUser',
      meta: { 
        title: '用户管理', 
        icon: 'el-icon-user',
        perms: ['campus:user:list']
      }
    },
    {
      path: 'miniuser',
      component: () => import('@/views/campus/miniuser/index'),
      name: 'CampusMiniUser',
      meta: { 
        title: '小程序用户管理', 
        icon: 'el-icon-mobile-phone',
        perms: ['campus:miniuser:list']
      }
    }
  ]
}

export default campusRouter 